	package com.mad.gdrapps;
	
	import android.app.Activity;
    import android.graphics.drawable.Drawable;  
	import android.os.Bundle;  
    import android.util.Log;
   
	import com.google.android.maps.GeoPoint;  
	import com.google.android.maps.MapActivity;  
	import com.google.android.maps.MapController; 
	
import com.google.android.maps.MapView;  
	
	public class ShowLocationScr extends MapActivity  {  
	     private MapView map;  
	     private MapController controller;  
	     
	     @Override  
	     
	     public void onCreate(Bundle savedInstanceState) {  
			   //get coods from previous activity via intent <--- Important  
		
	    	 //Bundle coords = getIntent().getExtras();  

	    	 Log.d("BANGLA", "ShowLocaiton::onCreate:: start");

	    	 Bundle b = getIntent().getBundleExtra("KEY_COORD_BUNDLE");
	    	 
	    	 
	          if (b == null) {  
	        	  Log.d("BANGLA", "ShowLocaiton::onCreate:: bundle is null - No coordinates");
	      		  return;  
		      }  
		      
		      String latt = b.getString("KEY_LATT");  
			  String lont = b.getString("KEY_LONG");  
			 
			  Log.d("BANGLA", "ShowLocaiton::onCreate::"+"lat="+latt+"lon="+lont);
			  
			 //convert from string to float  
			  float lat = Float.valueOf(latt.trim()).floatValue();  
			  float lon = Float.valueOf(lont.trim()).floatValue();  

			  Log.d("BANGLA", "ShowLocaiton::onCreate::1 ");

			  super.onCreate(savedInstanceState);  
			  Log.d("BANGLA", "ShowLocaiton::onCreate::2 ");

			  setContentView(R.layout.location);  
			  Log.d("BANGLA", "ShowLocaiton::onCreate::3 ");

			  initMapView();  
			  Log.d("BANGLA", "ShowLocaiton::onCreate::4 ");

			  //placing the marker with new class my itemized overlay S (without the onTap method)  
			  
			  Drawable marker=getResources().getDrawable(android.R.drawable.presence_online);  
			  int markerWidth = marker.getIntrinsicWidth();  
			  int markerHeight = marker.getIntrinsicHeight();  
			  marker.setBounds(0, markerHeight, markerWidth, 0);  
			  
			  MyItemizedOverlayS myItemizedOverlayS  
			   = new MyItemizedOverlayS(marker,ShowLocationScr.this);  
			  map.getOverlays().add(myItemizedOverlayS);  
			  //convert lat and lon values to 1E6 so we can get the point right  
			  int lt = (int) (lat*1E6);  
			  int ln = (int) (lon*1E6);  
			  //create the point and animate to it (aka set center)  
	
			  GeoPoint point = new GeoPoint(lt,ln);    
			  myItemizedOverlayS.nP(point,map,lat,lon);  
			  controller.animateTo(point);  
	     }  
	     
	      
	   protected boolean isRouteDisplayed() {  
		     // Required by MapActivity  
		     return false;  
	     }   
	     
	     private void initMapView() {  

	    	 Log.d("BANGLA", "ShowLocaiton::initMapView::1 ");

	          map = (MapView) findViewById(R.id.map); 
	          
	          controller = map.getController();  
	          Log.d("BANGLA", "ShowLocaiton::initMapView::2 ");
	          map.setSatellite(true);  
	          Log.d("BANGLA", "ShowLocaiton::initMapView::3 ");
	          map.setBuiltInZoomControls(true);  
	          Log.d("BANGLA", "ShowLocaiton::initMapView::4 ");
	          
	     }
	     
	}  
